package com.wms.controller;

import com.wms.bean.PageBean;
import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.entity.StockTakingTask;
import com.wms.service.ReviewAdjustmentsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "查询审核调整单列表")
public class ReviewAdjustmentsController {
    @Autowired
    ReviewAdjustmentsService reviewAdjustmentsService;

    @PutMapping("/reviewAdjustments")
    @ApiOperation("查询审核调整单列表")
    public ResultBean<PageBean<StockTakingTask>> queryReviewAdjustments(@RequestParam int page,@RequestParam int pageSize){
        PageBean pageBean = reviewAdjustmentsService.queryReviewAdjustments(page,pageSize);
        if (pageBean!=null){
            return R.success("查询成功",pageBean);
        }
        return R.fail("查询失败");
    }
}
